package cn.tedu._03weibo.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
public class UserRegParam {
    @Schema(description = "用户名", required = true)
    @Pattern(regexp = "^((?!.*(.)\\1\\1)[a-zA-Z0-9_]){4,12}$", message = "用户名长度为4-12位，且不允许连续出现3个及以上相同字符")
    private String username;

    @Schema(description = "密码", required = true)
    private String password;

    @Schema(description = "昵称", required = true)
    private String nickname;
}
